<!DOCTYPE html>
<html>

	<head>
		<% include meta.html %>
		<title>首页</title>
	</head>

	<body>

			<% include header.html %>
			<% include banner.html %>
	
		<!--当前位置-->
		<div class="page-c">
			<p class="f-18 c-6e6d6d mt-12 mb-10">当前位置：<a class="c-6e6d6d" href="/zf">我要租房</a>><a class="c-001600" href="/zf/list">列表</a></p>
<!-- 			
			<div class="search mt-20 mb-20">
				<span class="f-14 c-2c342f mr-30">
					类型：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>
				<span class="f-14 c-2c342f mr-30">	
					区域：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">	
					租金：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					居室：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					朝向：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					风格：
					<span class="select">
						<select name="type">
							<option value="">整租</option>
							<option value="">合租</option>
						</select>
					</span>
				</span>	
				<span class="f-14 c-2c342f mr-30">
					<input class="checkbox pos-r t-5" type="checkbox" /> 独立卫生间
				</span>	
				<span class="f-14 c-2c342f mr-30">
					<input class="checkbox pos-r t-5" type="checkbox" /> 独立阳台
				</span>
			</div> -->
			
			<hr class="hr-line mt-10" />
		</div>
		
		
		<!--合租房源-->
		<div class="page-c mt-10 mb-20">
			

			<div class="list-product">
			
				<ul class="overflow-h cl">
			<%if(list.length>0){%>
				<%for(var i=0,item;i<list.length;i++){%>
						<% item = list[i];%>		 
						<li class="border-10 pb-10">
								<a href="/zf/detail/<%=item.id%>">
							<figure class="pos-r mb-10">
								<%if(!!!item.thumbnail){%>
											<img class="fw-default" src="<%=base_url%>img/ali1.png" alt="" />
										<%}else{%>
											<img class="fw-default" src="<%=item.thumbnail%>" alt="" />		
										<%}%>
										<%if(item.type==1){%>
											<span class="ico-zz pos-a l-15 t_4"></span>
										<%}else{%>
											<span class="ico-hz pos-a l-15 t_4"></span>
										<%}%>
							</figure>
							<p class="f-16 ml-10 mr-10 c-2c342f bold"><%=item.title%></p>
							<p class="f-16 ml-10 mr-10 c-2c342f">
									<span class="w-250  nowrap">
											<%=item.addr%>
											</span>
										<span class="fr">
											<b>¥<%=item.price%> / </b>
											<small class="f-12 c-001600">月</small>
										</span>
							</p>
							</a>
						</li>
						<%}%>
				<%}else{%>
				
				<%}%>
				</ul>
			</div>
			
			<!--分页-->
			<div class="page row space-around">
				<ul class="row" id="page">
					<li>1</li>
					<li>2</li>
					<li class="current">3</li>
					<li>4</li>
					<li>5</li>
					<li>...</li>
					<li>最后</li>
				</ul>
			</div> 
			
		</div>

		<% include footer.html %>

		<% include js.html %>
			
<script>
	var vm = new Vue({
		el: '.page-c',
		data: {
			level: {}
		},
		methods: {
			page: function () {
				var pageNo = $m.getParams('page');
				if (pageNo <= 0) {
					pageNo = 1;
				}

				if (pageNo > parseInt('<%=totalpage%>')) {
					pageNo = parseInt('<%=totalpage%>');
				}

				Page({
					num: parseInt('<%=totalpage%>'),	//页码数
					startnum: pageNo,				//指定页码
					elem: $('#page'),		//指定的元素
					callback: function (n) {	//回调函数
						console.log(n);
						location.href = '/zf/list?page='+n
					}
				});
			}
		},
		created: function () {
			this.page();

		},
		mounted: function () {

		},
		updated: function () {

		}
	});

</script>
</body>

</html>